Ext.define('Zm.view.tour.Log',{
    alias:'widget.tourlog',
    extend:'Ext.grid.Panel',
    requires:['Ext.toolbar.Toolbar'],
    store:'TourLog',
    initComponent:function(){
        var me = this,
            lang = Zm.i18n.Lang;
            
        Ext.apply(me,{
            title: lang.tTourLog,
            iconCls:'tourlog',
            layout:'fit',
            columns:[
                {text:'ID',dataIndex:'logid'},
                {text:lang.tTourName,dataIndex:'logname'},
                {text:lang.tDate,dataIndex:'pdate'},
                {text:lang.tTourMan,dataIndex:'username'}
            ],
            dockedItems:[{
                xtype:'toolbar',
                items:[lang.tStartDate,{
                    xtype:'datefield',
                    itemId:'startdate',
                    format:'Y-m-d'
                },lang.tEndDate,{
                    xtype:'datefield',
                    itemId:'enddate',
                    format:'Y-m-d'
                },lang.tTourName,{
                    xtype:'combo',
                    valueField:'id',
                    displayField:'text',
                    editable:false,
                    store:Ext.create('Zm.store.TourCombo'),
                    itemId:'tid'
                },{
                    text:lang.tSearch,
                    iconCls:'btn-search',
                    action:'search'
                },{
                    text:lang.tExport,
                    iconCls:'export',
                    hidden:true,
                    action:'export'
                }]
            },{
                xtype: 'pagingtoolbar',
                store: me.store,
                dock: 'bottom',
                displayInfo: true                    
            }]
        });
        me.callParent(arguments);
    }
});